import java.util.ArrayList;

public class Main {
    static ArrayList<Integer> primes = new ArrayList<Integer>();

    public static void main(String[] args) {
        System.out.println(print_primes(-200, 200));
    }

    public static String print_primes(int min_number, int max_number) {
        String Output = "";
        int num;
        for (num = min_number; num <= max_number; num++) {
            if (num >= 0) {
                int num_thing = is_prime(num);
                if (num_thing == 0) {
                    Output += (num + "不是质数，是合数\n");
                } else if (num_thing == 1) {
                    Output += (num + "是质数，不是合数\n");
                } else if (num_thing == 2) {
                    Output += (num + "不是质数，不是合数\n");
                }

            } else {
                Output += (num + "不是质数，不是合数\n");
            }
        }
        return Output;
    }

    public static int is_prime(int number) {
        if (number < 2) {
            return 2;
        } else if (number == 2) {
            primes.add(number);
            return 1;
        } else {
            for (int idx : primes) {
                if (number % idx == 0) {
                    return 0;
                }
            }
            primes.add(number);
            return 1;
        }
    }
}